﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Cwjk_PzRuleSet_SelectKjkm.aspx.vb" Inherits="PubProject.Cwjk_PzRuleSet_SelectKjkm" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head runat="server">
    <title>选择会计科目</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
	<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
	<meta content="JavaScript" name="vs_defaultClientScript">
	<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
	<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
	<script language="javascript" src="/_common/scripts/global.js"></script>
	<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
	<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
	<script language="javascript" src="/_controls/settings.aspx"></script>
	<script language="javascript" src="/_controls/util/util.js"></script>
	<script language="javascript" src="/_nav/menu.js"></script>		
	<!-- GridTree -->
	<link rel="stylesheet" type="text/css" href="/_controls/tree/gridtree.css">
	<script language="javascript">
	    function window.onload()
	    {
	        if (document.all["txtKjkmOrderCode"].value != "")
	        {
	            appGridTree.selectByLevel(document.all["txtKjkmOrderCode"].value);
	        }	        
	        document.all["spanLevel"].innerHTML = document.all["sHtml"].value;
	    }
	    function OK()
	    {
	        var arrTr = appGridTree.selectedRow;
	        if (arrTr)
	        {
	            if(arrTr.IsEnd == "False" && arrTr.ObjectType != "1")
	            {
	                alert("当前科目不允许选择，请重新选择！");
	            }
	            else
	            {
	                var arrRtn = {};
	                arrRtn.KjkmGUID = arrTr.oid;
	                arrRtn.KjkmName = arrTr.KjkmName;
	                arrRtn.KjkmFullName = arrTr.KjkmFullName;
	                arrRtn.HsxmObjectText = arrTr.HsxmObjectText;
	                
	                parent.window.returnValue = arrRtn;
			        parent.window.close();
	            }
	        
	        }
	        else
	        {
	            alert("请选择会计科目！");
	        }
	    }
	</script>
</head>
<body MS_POSITIONING="GridLayout" style="MARGIN: 15px;">
    <form id="form1" runat="server">
    <asp:textbox id="txtKjkmOrderCode" runat="server" style="display:none"></asp:textbox>
    <!-- 生成级数过滤按钮  -->
	<input id="sHtml" type="hidden" name="sHtml" runat="server">
    <table style="FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%">
		<tr height="1">
			<td>
				<mnu:AppGridMenu id="appGridMenu" runat="server" />
			</td>
		</tr>
		<tr>
			<td vAlign="top">				
				<div style="WIDTH:100%; HEIGHT:100%; BACKGROUND-COLOR: white">
					<cnt:appgridtree id="appGridTree" runat="server"></cnt:appgridtree>
				</div>
			</td>
		</tr>
		<tr height="15">
			<td>
			</td>
		</tr>
		<TR height="60">
			<TD class="buttons" >
				<TABLE style="TABLE-LAYOUT: fixed; WIDTH: 100%; HEIGHT: 100%" cellSpacing="0" cellPadding="0">
					<TR>
						<TD align="right">
							<BUTTON style="WIDTH: 70px" onclick="OK()" id="btnOK" type="button">确 定</BUTTON>&nbsp;&nbsp;
							<BUTTON style="WIDTH: 70px" onclick="parent.window.close();" id="btnClose" type="button">取 消</BUTTON>
						</TD>
					</TR>
				</TABLE>
			</TD>
		</TR>
		
	</table>
    </form>
</body>
</html>
